/***************************************************************************
 *   Copyright (C) 2008 by beltegeuse   *
 *   beltegeuse@kubuntu-acer   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef BDAPP_APP_H
#define BDAPP_APP_H

#include <QObject>
#include <QMainWindow>

#include "ui_BdApp.h"

//Class QT
class QSplashScreen;
class QWidget;
class QAction;

//Class interne
class BdBibliotheque;
/**
Class pour l'interface principale
*/
class BdApp : public QMainWindow, public Ui::BdApp
{
  Q_OBJECT;
public:
  /**
   * Constructor
   * @param splash is the QSplashScreen
   *.@param parent
   * @param fl
  **/
  BdApp(QSplashScreen *splash, QWidget * parent = 0, Qt::WFlags fl = Qt::Window);
  //! Destructor
  ~BdApp();
  
protected:
	//Build the menu
        //! Fonction pour initialiser le menu pour la fenetre principale
	void createMenu();
        //! Fonction pour initialiser les actions pour la fenetre principale
	void createActions();
        //! Fonction pour initialiser le connection (Qt) pour la fenetre principale
	void createConnect();
private slots:
  //! Pour creer une bibliotheque vide
  void createEmptyBibliotheque();
  //! Pour ajouter un livre manuelement
  void ajouterLivreManuel();
  //! Pour afficher le plugin manager
  void pluginManager();
private:
  //Function
  /** Pour ajouter une bibliotheque deja correctement initialiser
     \warning Pas implemanter pour l'intant.
  */
  bool addBibliotheque(BdBibliotheque* myBiblio);


  //Attributes
  QSplashScreen* mSplash;
  //Actions Attributs
  QAction* mActionQuit;
  QAction* mActionAjoutLivreManuel;
  QAction* mActionAjoutEditeurManuel;
  QAction* mActionNouvelleBibliotheque;
  QAction* mActionPluginManager;
  //Menu Attributs
  QMenu* mMenuFichier;
  QMenu* mMenuEdition;
  QMenu* mMenuHelp;
  QMenu* mMenuEdtionLivre;
  QMenu* mMenuEdtionEdition;
  //Others
  
};

#endif
